$(function(){
    var socket = io.connect(serverPath);
    socket.emit(serverLoginEvent,{id:"control"});
    socket.on(clientLoginBackEvent, function(msg){
        $('#message').html(msg.message);
        showClientStatus(msg.clients);
    });
    //发送第一步操作
    $(".ctrl").click(function(){
        socket.emit(serverCtrlEvent,{cmd:$(this).attr("cmd"),content:$(this).attr("content"),dept:$(this).attr("dept"),pos:$(this).attr("pos")});
        $(this).css("background-color","red");
    });
    socket.on(clientCtrlEvent, function(msg){

        $('#message').html(msg);
    });
})